#include "widget.h"
#include "ui_widget.h"

#include "mylabel.h"
#include <QDebug>

Widget::Widget(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Widget)
{
    ui->setupUi(this);

    auto *l = new MyLabel(this);
    l->resize(200, 200);
    l->move(30, 30);
    l->setFrameShape(QFrame::Box);

    l->setMinNum(-20);
    l->setMaxNum(50);
    l->setStepNum(5);

    connect(ui->pushButton, &QPushButton::clicked, [l](){
        qDebug() << l->getIndex();
    });
}

Widget::~Widget()
{
    delete ui;
}
